﻿<?xml version="1.0" encoding="utf-8" ?>
<profile title="Generic" id="generic" version="1.3">
	<feature id="json" property="" default="0">
		<name>JSON</name>
		<description>Native JSON Object</description>
		<test type="text/javascript">
			<![CDATA[
			return !!window.JSON?1:0;
			]]>
		</test>
	</feature>

	<feature id="width" property="" default="800">
		<name>Screen Width</name>
		<description>From window.innerWidth if available, otherwise from screen.width.</description>
		<test type="text/javascript">
			<![CDATA[
			return (window.innerWidth>0)?window.innerWidth:screen.width;
			]]>
		</test>
	</feature>

	<feature id="height" property="" default="600">
		<name>Screen Height</name>
		<description>From window.innerHeight if available, otherwise from screen.height.</description>
		<test type="text/javascript">
			<![CDATA[
			return (window.innerHeight>0)?window.innerHeight:screen.height;
			]]>
		</test>
	</feature>

	<feature id="clr" property="" default="8">
		<name>Colour Depth</name>
		<description>Get the colour depth of the device display.</description>
		<data />
		<test type="text/javascript">
			<![CDATA[
			return screen.colorDepth;
			]]>
		</test>
	</feature>

	<feature id="supportsXmlHttp" property="" default="false">
		<name>XMLHttpRequest API</name>
		<description>Is an XMLHttpRequest object available on this device.</description>
		<test type="text/javascript">
			<![CDATA[
			try { xhr = new XMLHttpRequest(); } catch (e) {}
			try { xhr = new ActiveXObject("Microsoft.XMLHTTP"); } catch (e) {}
			try { xhr = new ActiveXObject("Msxml2.XMLHTTP"); } catch (e) {}
			return (xhr!==null);
			]]>
		</test>
	</feature>

	<feature id="geo" property="" default="0">
		<name>HTML5 Location API</name>
		<description>Support for HTML5 geo-location API</description>
		<test type="text/javascript">
			<![CDATA[
			return +!!navigator.geolocation;	
			]]>
		</test>
	</feature>

	<feature id="touch" property="" default="0">
		<name>Touch Events</name>
		<description>Ability to create TouchEvent listeners.</description>
		<test type="text/javascript">
			<![CDATA[
			try{document.createEvent("TouchEvent");return 1;}
			catch(e){return 0;}
			]]>
		</test>
	</feature>

	<feature id="hashchange" property="" default="0">
		<name>Hash Change Event</name>
		<description>Ability to raise events when a hash tag change is detected</description>
		<test type="text/javascript">
			<![CDATA[
			return ('onhashchange' in window);
			]]>
		</test>
	</feature>
</profile>
